<?xml version="1.0" encoding="utf-8"?>

<EFFECT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns ="urn:dsfx0">

  <ACCELERATION_STRUCTURE>
    <NAME>TopLevelAS</NAME>
    <STAGES>RaygenStage ClosestHitStage AnyHitStage MissStage</STAGES>
  </ACCELERATION_STRUCTURE>
  
  <CONSTANT_BUFFER>
    <NAME>cbCamera</NAME>
    <STAGES>RaygenStage ClosestHitStage AnyHitStage MissStage</STAGES>
  </CONSTANT_BUFFER>
  
  <CONSTANT_BUFFER>
    <NAME>cbPostEffect_RT_AO</NAME>
    <STAGES>RaygenStage ClosestHitStage AnyHitStage MissStage</STAGES>
  </CONSTANT_BUFFER>
  
  <CONSTANT_BUFFER>
    <NAME>cbPostEffect_RT_AO_Auto</NAME>
    <STAGES>RaygenStage ClosestHitStage AnyHitStage MissStage</STAGES>
  </CONSTANT_BUFFER>

  <CONSTANT_BUFFER>
    <NAME>cbGlobalClipping</NAME>
    <!--<NEEDS_OPTION>Clipping</NEEDS_OPTION>-->
    <STAGES>RaygenStage</STAGES>
  </CONSTANT_BUFFER>

  <SAMPLER>
    <NAME>RaytraceNormalMap</NAME>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>sampler2D</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>!IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>sampler2DMS</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <STAGES>RaygenStage</STAGES>
  </SAMPLER>
  
  <SAMPLER>
    <NAME>RaytraceZMap</NAME>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>sampler2D</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>!IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>sampler2DMS</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <STAGES>RaygenStage</STAGES>
  </SAMPLER>

  <SAMPLER>
    <NAME>RaytraceWorldPosMap</NAME>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>sampler2D</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>!IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <SAMPLER_DECLARATION>
      <SAMPLER_TYPE>sampler2DMS</SAMPLER_TYPE>
      <SAMPLER_OPTION_GRAMMAR>IS_MSAA</SAMPLER_OPTION_GRAMMAR>
    </SAMPLER_DECLARATION>
    <STAGES>RaygenStage</STAGES>
  </SAMPLER>
  
  <STORAGE_IMAGE>
    <NAME>RaytraceOutput</NAME>
    <DECLARATION>
      <TYPE>image2D</TYPE>
      <FORMAT>r8</FORMAT>
      <OPTION_GRAMMAR>!D_HRTAO !IS_MSAA</OPTION_GRAMMAR>
    </DECLARATION>
    <STAGES>RaygenStage</STAGES>
  </STORAGE_IMAGE>

  <TECHNIQUE>
    <NAME>Default</NAME>
    
    <RAYTRACING_PASS>
      <NAME>Default</NAME>

      <RAYGEN_STAGE>commonHelpers ubos PostEffect_RT_AO_Helpers PostEffect_RT_AO_RS</RAYGEN_STAGE>
      <MISS_STAGE>PostEffect_RT_AO_Helpers PostEffect_RT_AO_MS</MISS_STAGE>
      <HIT_GROUP>
        <CLOSEST_HIT_STAGE>ubos PostEffect_RT_AO_Helpers PostEffect_RT_AO_CHS</CLOSEST_HIT_STAGE>
        <ANY_HIT_STAGE>PostEffect_RT_AO_Helpers PostEffect_RT_AO_AHS</ANY_HIT_STAGE>
      </HIT_GROUP>
    
  </RAYTRACING_PASS>
  </TECHNIQUE>  
</EFFECT>
